package com.cloudfun.campusshare.service;

import com.cloudfun.campusshare.common.constant.DeviceType;
import com.cloudfun.campusshare.common.model.vo.FinishFixVO;
import com.cloudfun.campusshare.common.model.vo.PersonPointVO;
import com.cloudfun.campusshare.common.model.vo.WorkerOrderBaseVO;
import com.cloudfun.campusshare.common.model.vo.WorkerOrderCountVO;
import com.cloudfun.campusshare.common.response.PageResult;
import io.swagger.annotations.ApiParam;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Set;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2020/5/11 15:13
 * @description :
 */
public interface WorkerOrderService {

    /**
     * 查询工单列表
     *
     * @param pageable
     * @param washPointIds
     * @param status
     * @param taskType
     * @return
     */
    PageResult queryWorkerOrder(Pageable pageable, Integer time, Set<String> washPointIds,
                                String keyword,
                                Set<Integer> status,
                                Set<Integer> taskType,
                                String merchantId,
                                String productType,
                                String deviceType);


    /**
     * 查询工单详情
     *
     * @param workerOrderId
     * @return
     */
    WorkerOrderBaseVO queryWorkerOrderDetail(String workerOrderId);

    /**
     * 人员指派
     *
     * @param personPointVO
     */
    void workerOrderPoint(PersonPointVO personPointVO);

    /**
     * 完成检修
     *
     * @param finishFixVO
     */
    void finishFix(FinishFixVO finishFixVO);


    /**
     * 根据状态获得分组数量
     *
     * @param merchantId
     * @return
     */
    List<WorkerOrderCountVO> countGroupByStatus(String merchantId,
                                                Integer time,
                                                Integer taskType,
                                                String productType,
                                                String deviceType);

    /**
     * 领取工单
     *
     * @param workerOrderId
     */
    void offerWorkerOrder(String workerOrderId);
}
